#pragma once
// MESSAGE SIMPLE_FC_DATA_MONITOR PACKING

#define MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR 10


typedef struct __mavlink_simple_fc_data_monitor_t {
 uint64_t time_unix_usec; /*< [us] Timestamp (UNIX epoch time in microseconds).*/
 float roll; /*< [deg] Roll angle.*/
 float pitch; /*< [deg] Pitch angle.*/
 float yaw; /*< [deg] Yaw angle (heading).*/
 float roll_rate; /*< [deg/s] Roll angular velocity.*/
 float pitch_rate; /*< [deg/s] Pitch angular velocity.*/
 float yaw_rate; /*< [deg/s] Yaw angular velocity.*/
 int32_t lat; /*< [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.*/
 int32_t lon; /*< [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.*/
 int32_t alt_msl; /*< [mm] Altitude above mean sea level (MSL) in millimeters.*/
 int32_t alt_relative; /*< [mm] Altitude above ground/takeoff point in millimeters.*/
 float groundspeed; /*< [m/s] Ground speed (2D velocity).*/
 float vertical_speed; /*< [m/s] Vertical speed (positive=up).*/
 float airspeed; /*< [m/s] Airspeed (3D velocity magnitude, for fixed-wing).*/
 float battery_voltage; /*< [V] Battery voltage.*/
 float battery_current; /*< [A] Battery current (negative=discharging).*/
 uint16_t frame_id; /*<  Frame ID (incremental counter for packet loss detection).*/
 uint16_t gps_hdop; /*<  GPS HDOP horizontal dilution of precision (unitless * 100).*/
 uint16_t throttle_pct; /*<  Throttle percentage (0-1000, 500=50%).*/
 uint16_t ekf_flags; /*<  EKF status flags (bit field).*/
 uint8_t flight_mode; /*<  Current flight mode (MAV_MODE or custom mode number).*/
 uint8_t armed_status; /*<  Armed status (0=Disarmed, 1=Armed).*/
 uint8_t system_health; /*<  System health status (0=OK, 1-255=Various error codes).*/
 uint8_t battery_remaining; /*< [%] Remaining battery capacity (0-100%).*/
 uint8_t gps_sats; /*<  Number of GPS satellites visible.*/
 uint8_t gps_fix_type; /*<  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).*/
 uint8_t rc_rssi; /*< [%] RC signal strength (0-100%).*/
 uint8_t vibration_level; /*< [%] Vibration level (0-100%).*/
 uint8_t cpu_load; /*< [%] CPU load percentage (0-100%).*/
} mavlink_simple_fc_data_monitor_t;

#define MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN 85
#define MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN 85
#define MAVLINK_MSG_ID_10_LEN 85
#define MAVLINK_MSG_ID_10_MIN_LEN 85

#define MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC 194
#define MAVLINK_MSG_ID_10_CRC 194



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SIMPLE_FC_DATA_MONITOR { \
    10, \
    "SIMPLE_FC_DATA_MONITOR", \
    29, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_simple_fc_data_monitor_t, time_unix_usec) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 68, offsetof(mavlink_simple_fc_data_monitor_t, frame_id) }, \
         { "flight_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 76, offsetof(mavlink_simple_fc_data_monitor_t, flight_mode) }, \
         { "armed_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 77, offsetof(mavlink_simple_fc_data_monitor_t, armed_status) }, \
         { "system_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 78, offsetof(mavlink_simple_fc_data_monitor_t, system_health) }, \
         { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_simple_fc_data_monitor_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_simple_fc_data_monitor_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_simple_fc_data_monitor_t, yaw) }, \
         { "roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_simple_fc_data_monitor_t, roll_rate) }, \
         { "pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_simple_fc_data_monitor_t, pitch_rate) }, \
         { "yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_simple_fc_data_monitor_t, yaw_rate) }, \
         { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_simple_fc_data_monitor_t, lat) }, \
         { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_simple_fc_data_monitor_t, lon) }, \
         { "alt_msl", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_simple_fc_data_monitor_t, alt_msl) }, \
         { "alt_relative", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_simple_fc_data_monitor_t, alt_relative) }, \
         { "groundspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_simple_fc_data_monitor_t, groundspeed) }, \
         { "vertical_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_simple_fc_data_monitor_t, vertical_speed) }, \
         { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_simple_fc_data_monitor_t, airspeed) }, \
         { "battery_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_simple_fc_data_monitor_t, battery_voltage) }, \
         { "battery_current", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_simple_fc_data_monitor_t, battery_current) }, \
         { "battery_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 79, offsetof(mavlink_simple_fc_data_monitor_t, battery_remaining) }, \
         { "gps_sats", NULL, MAVLINK_TYPE_UINT8_T, 0, 80, offsetof(mavlink_simple_fc_data_monitor_t, gps_sats) }, \
         { "gps_fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 81, offsetof(mavlink_simple_fc_data_monitor_t, gps_fix_type) }, \
         { "gps_hdop", NULL, MAVLINK_TYPE_UINT16_T, 0, 70, offsetof(mavlink_simple_fc_data_monitor_t, gps_hdop) }, \
         { "rc_rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_simple_fc_data_monitor_t, rc_rssi) }, \
         { "throttle_pct", NULL, MAVLINK_TYPE_UINT16_T, 0, 72, offsetof(mavlink_simple_fc_data_monitor_t, throttle_pct) }, \
         { "ekf_flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 74, offsetof(mavlink_simple_fc_data_monitor_t, ekf_flags) }, \
         { "vibration_level", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_simple_fc_data_monitor_t, vibration_level) }, \
         { "cpu_load", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_simple_fc_data_monitor_t, cpu_load) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_SIMPLE_FC_DATA_MONITOR { \
    "SIMPLE_FC_DATA_MONITOR", \
    29, \
    {  { "time_unix_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_simple_fc_data_monitor_t, time_unix_usec) }, \
         { "frame_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 68, offsetof(mavlink_simple_fc_data_monitor_t, frame_id) }, \
         { "flight_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 76, offsetof(mavlink_simple_fc_data_monitor_t, flight_mode) }, \
         { "armed_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 77, offsetof(mavlink_simple_fc_data_monitor_t, armed_status) }, \
         { "system_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 78, offsetof(mavlink_simple_fc_data_monitor_t, system_health) }, \
         { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_simple_fc_data_monitor_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_simple_fc_data_monitor_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_simple_fc_data_monitor_t, yaw) }, \
         { "roll_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_simple_fc_data_monitor_t, roll_rate) }, \
         { "pitch_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_simple_fc_data_monitor_t, pitch_rate) }, \
         { "yaw_rate", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_simple_fc_data_monitor_t, yaw_rate) }, \
         { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_simple_fc_data_monitor_t, lat) }, \
         { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_simple_fc_data_monitor_t, lon) }, \
         { "alt_msl", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_simple_fc_data_monitor_t, alt_msl) }, \
         { "alt_relative", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_simple_fc_data_monitor_t, alt_relative) }, \
         { "groundspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_simple_fc_data_monitor_t, groundspeed) }, \
         { "vertical_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_simple_fc_data_monitor_t, vertical_speed) }, \
         { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_simple_fc_data_monitor_t, airspeed) }, \
         { "battery_voltage", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_simple_fc_data_monitor_t, battery_voltage) }, \
         { "battery_current", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_simple_fc_data_monitor_t, battery_current) }, \
         { "battery_remaining", NULL, MAVLINK_TYPE_UINT8_T, 0, 79, offsetof(mavlink_simple_fc_data_monitor_t, battery_remaining) }, \
         { "gps_sats", NULL, MAVLINK_TYPE_UINT8_T, 0, 80, offsetof(mavlink_simple_fc_data_monitor_t, gps_sats) }, \
         { "gps_fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 81, offsetof(mavlink_simple_fc_data_monitor_t, gps_fix_type) }, \
         { "gps_hdop", NULL, MAVLINK_TYPE_UINT16_T, 0, 70, offsetof(mavlink_simple_fc_data_monitor_t, gps_hdop) }, \
         { "rc_rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_simple_fc_data_monitor_t, rc_rssi) }, \
         { "throttle_pct", NULL, MAVLINK_TYPE_UINT16_T, 0, 72, offsetof(mavlink_simple_fc_data_monitor_t, throttle_pct) }, \
         { "ekf_flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 74, offsetof(mavlink_simple_fc_data_monitor_t, ekf_flags) }, \
         { "vibration_level", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_simple_fc_data_monitor_t, vibration_level) }, \
         { "cpu_load", NULL, MAVLINK_TYPE_UINT8_T, 0, 84, offsetof(mavlink_simple_fc_data_monitor_t, cpu_load) }, \
         } \
}
#endif

/**
 * @brief Pack a simple_fc_data_monitor message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec [us] Timestamp (UNIX epoch time in microseconds).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param flight_mode  Current flight mode (MAV_MODE or custom mode number).
 * @param armed_status  Armed status (0=Disarmed, 1=Armed).
 * @param system_health  System health status (0=OK, 1-255=Various error codes).
 * @param roll [deg] Roll angle.
 * @param pitch [deg] Pitch angle.
 * @param yaw [deg] Yaw angle (heading).
 * @param roll_rate [deg/s] Roll angular velocity.
 * @param pitch_rate [deg/s] Pitch angular velocity.
 * @param yaw_rate [deg/s] Yaw angular velocity.
 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param alt_msl [mm] Altitude above mean sea level (MSL) in millimeters.
 * @param alt_relative [mm] Altitude above ground/takeoff point in millimeters.
 * @param groundspeed [m/s] Ground speed (2D velocity).
 * @param vertical_speed [m/s] Vertical speed (positive=up).
 * @param airspeed [m/s] Airspeed (3D velocity magnitude, for fixed-wing).
 * @param battery_voltage [V] Battery voltage.
 * @param battery_current [A] Battery current (negative=discharging).
 * @param battery_remaining [%] Remaining battery capacity (0-100%).
 * @param gps_sats  Number of GPS satellites visible.
 * @param gps_fix_type  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).
 * @param gps_hdop  GPS HDOP horizontal dilution of precision (unitless * 100).
 * @param rc_rssi [%] RC signal strength (0-100%).
 * @param throttle_pct  Throttle percentage (0-1000, 500=50%).
 * @param ekf_flags  EKF status flags (bit field).
 * @param vibration_level [%] Vibration level (0-100%).
 * @param cpu_load [%] CPU load percentage (0-100%).
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint16_t frame_id, uint8_t flight_mode, uint8_t armed_status, uint8_t system_health, float roll, float pitch, float yaw, float roll_rate, float pitch_rate, float yaw_rate, int32_t lat, int32_t lon, int32_t alt_msl, int32_t alt_relative, float groundspeed, float vertical_speed, float airspeed, float battery_voltage, float battery_current, uint8_t battery_remaining, uint8_t gps_sats, uint8_t gps_fix_type, uint16_t gps_hdop, uint8_t rc_rssi, uint16_t throttle_pct, uint16_t ekf_flags, uint8_t vibration_level, uint8_t cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, roll);
    _mav_put_float(buf, 12, pitch);
    _mav_put_float(buf, 16, yaw);
    _mav_put_float(buf, 20, roll_rate);
    _mav_put_float(buf, 24, pitch_rate);
    _mav_put_float(buf, 28, yaw_rate);
    _mav_put_int32_t(buf, 32, lat);
    _mav_put_int32_t(buf, 36, lon);
    _mav_put_int32_t(buf, 40, alt_msl);
    _mav_put_int32_t(buf, 44, alt_relative);
    _mav_put_float(buf, 48, groundspeed);
    _mav_put_float(buf, 52, vertical_speed);
    _mav_put_float(buf, 56, airspeed);
    _mav_put_float(buf, 60, battery_voltage);
    _mav_put_float(buf, 64, battery_current);
    _mav_put_uint16_t(buf, 68, frame_id);
    _mav_put_uint16_t(buf, 70, gps_hdop);
    _mav_put_uint16_t(buf, 72, throttle_pct);
    _mav_put_uint16_t(buf, 74, ekf_flags);
    _mav_put_uint8_t(buf, 76, flight_mode);
    _mav_put_uint8_t(buf, 77, armed_status);
    _mav_put_uint8_t(buf, 78, system_health);
    _mav_put_uint8_t(buf, 79, battery_remaining);
    _mav_put_uint8_t(buf, 80, gps_sats);
    _mav_put_uint8_t(buf, 81, gps_fix_type);
    _mav_put_uint8_t(buf, 82, rc_rssi);
    _mav_put_uint8_t(buf, 83, vibration_level);
    _mav_put_uint8_t(buf, 84, cpu_load);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#else
    mavlink_simple_fc_data_monitor_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.roll_rate = roll_rate;
    packet.pitch_rate = pitch_rate;
    packet.yaw_rate = yaw_rate;
    packet.lat = lat;
    packet.lon = lon;
    packet.alt_msl = alt_msl;
    packet.alt_relative = alt_relative;
    packet.groundspeed = groundspeed;
    packet.vertical_speed = vertical_speed;
    packet.airspeed = airspeed;
    packet.battery_voltage = battery_voltage;
    packet.battery_current = battery_current;
    packet.frame_id = frame_id;
    packet.gps_hdop = gps_hdop;
    packet.throttle_pct = throttle_pct;
    packet.ekf_flags = ekf_flags;
    packet.flight_mode = flight_mode;
    packet.armed_status = armed_status;
    packet.system_health = system_health;
    packet.battery_remaining = battery_remaining;
    packet.gps_sats = gps_sats;
    packet.gps_fix_type = gps_fix_type;
    packet.rc_rssi = rc_rssi;
    packet.vibration_level = vibration_level;
    packet.cpu_load = cpu_load;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
}

/**
 * @brief Pack a simple_fc_data_monitor message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_unix_usec [us] Timestamp (UNIX epoch time in microseconds).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param flight_mode  Current flight mode (MAV_MODE or custom mode number).
 * @param armed_status  Armed status (0=Disarmed, 1=Armed).
 * @param system_health  System health status (0=OK, 1-255=Various error codes).
 * @param roll [deg] Roll angle.
 * @param pitch [deg] Pitch angle.
 * @param yaw [deg] Yaw angle (heading).
 * @param roll_rate [deg/s] Roll angular velocity.
 * @param pitch_rate [deg/s] Pitch angular velocity.
 * @param yaw_rate [deg/s] Yaw angular velocity.
 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param alt_msl [mm] Altitude above mean sea level (MSL) in millimeters.
 * @param alt_relative [mm] Altitude above ground/takeoff point in millimeters.
 * @param groundspeed [m/s] Ground speed (2D velocity).
 * @param vertical_speed [m/s] Vertical speed (positive=up).
 * @param airspeed [m/s] Airspeed (3D velocity magnitude, for fixed-wing).
 * @param battery_voltage [V] Battery voltage.
 * @param battery_current [A] Battery current (negative=discharging).
 * @param battery_remaining [%] Remaining battery capacity (0-100%).
 * @param gps_sats  Number of GPS satellites visible.
 * @param gps_fix_type  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).
 * @param gps_hdop  GPS HDOP horizontal dilution of precision (unitless * 100).
 * @param rc_rssi [%] RC signal strength (0-100%).
 * @param throttle_pct  Throttle percentage (0-1000, 500=50%).
 * @param ekf_flags  EKF status flags (bit field).
 * @param vibration_level [%] Vibration level (0-100%).
 * @param cpu_load [%] CPU load percentage (0-100%).
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
                               uint64_t time_unix_usec, uint16_t frame_id, uint8_t flight_mode, uint8_t armed_status, uint8_t system_health, float roll, float pitch, float yaw, float roll_rate, float pitch_rate, float yaw_rate, int32_t lat, int32_t lon, int32_t alt_msl, int32_t alt_relative, float groundspeed, float vertical_speed, float airspeed, float battery_voltage, float battery_current, uint8_t battery_remaining, uint8_t gps_sats, uint8_t gps_fix_type, uint16_t gps_hdop, uint8_t rc_rssi, uint16_t throttle_pct, uint16_t ekf_flags, uint8_t vibration_level, uint8_t cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, roll);
    _mav_put_float(buf, 12, pitch);
    _mav_put_float(buf, 16, yaw);
    _mav_put_float(buf, 20, roll_rate);
    _mav_put_float(buf, 24, pitch_rate);
    _mav_put_float(buf, 28, yaw_rate);
    _mav_put_int32_t(buf, 32, lat);
    _mav_put_int32_t(buf, 36, lon);
    _mav_put_int32_t(buf, 40, alt_msl);
    _mav_put_int32_t(buf, 44, alt_relative);
    _mav_put_float(buf, 48, groundspeed);
    _mav_put_float(buf, 52, vertical_speed);
    _mav_put_float(buf, 56, airspeed);
    _mav_put_float(buf, 60, battery_voltage);
    _mav_put_float(buf, 64, battery_current);
    _mav_put_uint16_t(buf, 68, frame_id);
    _mav_put_uint16_t(buf, 70, gps_hdop);
    _mav_put_uint16_t(buf, 72, throttle_pct);
    _mav_put_uint16_t(buf, 74, ekf_flags);
    _mav_put_uint8_t(buf, 76, flight_mode);
    _mav_put_uint8_t(buf, 77, armed_status);
    _mav_put_uint8_t(buf, 78, system_health);
    _mav_put_uint8_t(buf, 79, battery_remaining);
    _mav_put_uint8_t(buf, 80, gps_sats);
    _mav_put_uint8_t(buf, 81, gps_fix_type);
    _mav_put_uint8_t(buf, 82, rc_rssi);
    _mav_put_uint8_t(buf, 83, vibration_level);
    _mav_put_uint8_t(buf, 84, cpu_load);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#else
    mavlink_simple_fc_data_monitor_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.roll_rate = roll_rate;
    packet.pitch_rate = pitch_rate;
    packet.yaw_rate = yaw_rate;
    packet.lat = lat;
    packet.lon = lon;
    packet.alt_msl = alt_msl;
    packet.alt_relative = alt_relative;
    packet.groundspeed = groundspeed;
    packet.vertical_speed = vertical_speed;
    packet.airspeed = airspeed;
    packet.battery_voltage = battery_voltage;
    packet.battery_current = battery_current;
    packet.frame_id = frame_id;
    packet.gps_hdop = gps_hdop;
    packet.throttle_pct = throttle_pct;
    packet.ekf_flags = ekf_flags;
    packet.flight_mode = flight_mode;
    packet.armed_status = armed_status;
    packet.system_health = system_health;
    packet.battery_remaining = battery_remaining;
    packet.gps_sats = gps_sats;
    packet.gps_fix_type = gps_fix_type;
    packet.rc_rssi = rc_rssi;
    packet.vibration_level = vibration_level;
    packet.cpu_load = cpu_load;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR;
#if MAVLINK_CRC_EXTRA
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#else
    return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#endif
}

/**
 * @brief Pack a simple_fc_data_monitor message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_unix_usec [us] Timestamp (UNIX epoch time in microseconds).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param flight_mode  Current flight mode (MAV_MODE or custom mode number).
 * @param armed_status  Armed status (0=Disarmed, 1=Armed).
 * @param system_health  System health status (0=OK, 1-255=Various error codes).
 * @param roll [deg] Roll angle.
 * @param pitch [deg] Pitch angle.
 * @param yaw [deg] Yaw angle (heading).
 * @param roll_rate [deg/s] Roll angular velocity.
 * @param pitch_rate [deg/s] Pitch angular velocity.
 * @param yaw_rate [deg/s] Yaw angular velocity.
 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param alt_msl [mm] Altitude above mean sea level (MSL) in millimeters.
 * @param alt_relative [mm] Altitude above ground/takeoff point in millimeters.
 * @param groundspeed [m/s] Ground speed (2D velocity).
 * @param vertical_speed [m/s] Vertical speed (positive=up).
 * @param airspeed [m/s] Airspeed (3D velocity magnitude, for fixed-wing).
 * @param battery_voltage [V] Battery voltage.
 * @param battery_current [A] Battery current (negative=discharging).
 * @param battery_remaining [%] Remaining battery capacity (0-100%).
 * @param gps_sats  Number of GPS satellites visible.
 * @param gps_fix_type  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).
 * @param gps_hdop  GPS HDOP horizontal dilution of precision (unitless * 100).
 * @param rc_rssi [%] RC signal strength (0-100%).
 * @param throttle_pct  Throttle percentage (0-1000, 500=50%).
 * @param ekf_flags  EKF status flags (bit field).
 * @param vibration_level [%] Vibration level (0-100%).
 * @param cpu_load [%] CPU load percentage (0-100%).
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint64_t time_unix_usec,uint16_t frame_id,uint8_t flight_mode,uint8_t armed_status,uint8_t system_health,float roll,float pitch,float yaw,float roll_rate,float pitch_rate,float yaw_rate,int32_t lat,int32_t lon,int32_t alt_msl,int32_t alt_relative,float groundspeed,float vertical_speed,float airspeed,float battery_voltage,float battery_current,uint8_t battery_remaining,uint8_t gps_sats,uint8_t gps_fix_type,uint16_t gps_hdop,uint8_t rc_rssi,uint16_t throttle_pct,uint16_t ekf_flags,uint8_t vibration_level,uint8_t cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, roll);
    _mav_put_float(buf, 12, pitch);
    _mav_put_float(buf, 16, yaw);
    _mav_put_float(buf, 20, roll_rate);
    _mav_put_float(buf, 24, pitch_rate);
    _mav_put_float(buf, 28, yaw_rate);
    _mav_put_int32_t(buf, 32, lat);
    _mav_put_int32_t(buf, 36, lon);
    _mav_put_int32_t(buf, 40, alt_msl);
    _mav_put_int32_t(buf, 44, alt_relative);
    _mav_put_float(buf, 48, groundspeed);
    _mav_put_float(buf, 52, vertical_speed);
    _mav_put_float(buf, 56, airspeed);
    _mav_put_float(buf, 60, battery_voltage);
    _mav_put_float(buf, 64, battery_current);
    _mav_put_uint16_t(buf, 68, frame_id);
    _mav_put_uint16_t(buf, 70, gps_hdop);
    _mav_put_uint16_t(buf, 72, throttle_pct);
    _mav_put_uint16_t(buf, 74, ekf_flags);
    _mav_put_uint8_t(buf, 76, flight_mode);
    _mav_put_uint8_t(buf, 77, armed_status);
    _mav_put_uint8_t(buf, 78, system_health);
    _mav_put_uint8_t(buf, 79, battery_remaining);
    _mav_put_uint8_t(buf, 80, gps_sats);
    _mav_put_uint8_t(buf, 81, gps_fix_type);
    _mav_put_uint8_t(buf, 82, rc_rssi);
    _mav_put_uint8_t(buf, 83, vibration_level);
    _mav_put_uint8_t(buf, 84, cpu_load);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#else
    mavlink_simple_fc_data_monitor_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.roll_rate = roll_rate;
    packet.pitch_rate = pitch_rate;
    packet.yaw_rate = yaw_rate;
    packet.lat = lat;
    packet.lon = lon;
    packet.alt_msl = alt_msl;
    packet.alt_relative = alt_relative;
    packet.groundspeed = groundspeed;
    packet.vertical_speed = vertical_speed;
    packet.airspeed = airspeed;
    packet.battery_voltage = battery_voltage;
    packet.battery_current = battery_current;
    packet.frame_id = frame_id;
    packet.gps_hdop = gps_hdop;
    packet.throttle_pct = throttle_pct;
    packet.ekf_flags = ekf_flags;
    packet.flight_mode = flight_mode;
    packet.armed_status = armed_status;
    packet.system_health = system_health;
    packet.battery_remaining = battery_remaining;
    packet.gps_sats = gps_sats;
    packet.gps_fix_type = gps_fix_type;
    packet.rc_rssi = rc_rssi;
    packet.vibration_level = vibration_level;
    packet.cpu_load = cpu_load;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
}

/**
 * @brief Encode a simple_fc_data_monitor struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param simple_fc_data_monitor C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_simple_fc_data_monitor_t* simple_fc_data_monitor)
{
    return mavlink_msg_simple_fc_data_monitor_pack(system_id, component_id, msg, simple_fc_data_monitor->time_unix_usec, simple_fc_data_monitor->frame_id, simple_fc_data_monitor->flight_mode, simple_fc_data_monitor->armed_status, simple_fc_data_monitor->system_health, simple_fc_data_monitor->roll, simple_fc_data_monitor->pitch, simple_fc_data_monitor->yaw, simple_fc_data_monitor->roll_rate, simple_fc_data_monitor->pitch_rate, simple_fc_data_monitor->yaw_rate, simple_fc_data_monitor->lat, simple_fc_data_monitor->lon, simple_fc_data_monitor->alt_msl, simple_fc_data_monitor->alt_relative, simple_fc_data_monitor->groundspeed, simple_fc_data_monitor->vertical_speed, simple_fc_data_monitor->airspeed, simple_fc_data_monitor->battery_voltage, simple_fc_data_monitor->battery_current, simple_fc_data_monitor->battery_remaining, simple_fc_data_monitor->gps_sats, simple_fc_data_monitor->gps_fix_type, simple_fc_data_monitor->gps_hdop, simple_fc_data_monitor->rc_rssi, simple_fc_data_monitor->throttle_pct, simple_fc_data_monitor->ekf_flags, simple_fc_data_monitor->vibration_level, simple_fc_data_monitor->cpu_load);
}

/**
 * @brief Encode a simple_fc_data_monitor struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param simple_fc_data_monitor C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_simple_fc_data_monitor_t* simple_fc_data_monitor)
{
    return mavlink_msg_simple_fc_data_monitor_pack_chan(system_id, component_id, chan, msg, simple_fc_data_monitor->time_unix_usec, simple_fc_data_monitor->frame_id, simple_fc_data_monitor->flight_mode, simple_fc_data_monitor->armed_status, simple_fc_data_monitor->system_health, simple_fc_data_monitor->roll, simple_fc_data_monitor->pitch, simple_fc_data_monitor->yaw, simple_fc_data_monitor->roll_rate, simple_fc_data_monitor->pitch_rate, simple_fc_data_monitor->yaw_rate, simple_fc_data_monitor->lat, simple_fc_data_monitor->lon, simple_fc_data_monitor->alt_msl, simple_fc_data_monitor->alt_relative, simple_fc_data_monitor->groundspeed, simple_fc_data_monitor->vertical_speed, simple_fc_data_monitor->airspeed, simple_fc_data_monitor->battery_voltage, simple_fc_data_monitor->battery_current, simple_fc_data_monitor->battery_remaining, simple_fc_data_monitor->gps_sats, simple_fc_data_monitor->gps_fix_type, simple_fc_data_monitor->gps_hdop, simple_fc_data_monitor->rc_rssi, simple_fc_data_monitor->throttle_pct, simple_fc_data_monitor->ekf_flags, simple_fc_data_monitor->vibration_level, simple_fc_data_monitor->cpu_load);
}

/**
 * @brief Encode a simple_fc_data_monitor struct with provided status structure
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param status MAVLink status structure
 * @param msg The MAVLink message to compress the data into
 * @param simple_fc_data_monitor C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_simple_fc_data_monitor_t* simple_fc_data_monitor)
{
    return mavlink_msg_simple_fc_data_monitor_pack_status(system_id, component_id, _status, msg,  simple_fc_data_monitor->time_unix_usec, simple_fc_data_monitor->frame_id, simple_fc_data_monitor->flight_mode, simple_fc_data_monitor->armed_status, simple_fc_data_monitor->system_health, simple_fc_data_monitor->roll, simple_fc_data_monitor->pitch, simple_fc_data_monitor->yaw, simple_fc_data_monitor->roll_rate, simple_fc_data_monitor->pitch_rate, simple_fc_data_monitor->yaw_rate, simple_fc_data_monitor->lat, simple_fc_data_monitor->lon, simple_fc_data_monitor->alt_msl, simple_fc_data_monitor->alt_relative, simple_fc_data_monitor->groundspeed, simple_fc_data_monitor->vertical_speed, simple_fc_data_monitor->airspeed, simple_fc_data_monitor->battery_voltage, simple_fc_data_monitor->battery_current, simple_fc_data_monitor->battery_remaining, simple_fc_data_monitor->gps_sats, simple_fc_data_monitor->gps_fix_type, simple_fc_data_monitor->gps_hdop, simple_fc_data_monitor->rc_rssi, simple_fc_data_monitor->throttle_pct, simple_fc_data_monitor->ekf_flags, simple_fc_data_monitor->vibration_level, simple_fc_data_monitor->cpu_load);
}

/**
 * @brief Send a simple_fc_data_monitor message
 * @param chan MAVLink channel to send the message
 *
 * @param time_unix_usec [us] Timestamp (UNIX epoch time in microseconds).
 * @param frame_id  Frame ID (incremental counter for packet loss detection).
 * @param flight_mode  Current flight mode (MAV_MODE or custom mode number).
 * @param armed_status  Armed status (0=Disarmed, 1=Armed).
 * @param system_health  System health status (0=OK, 1-255=Various error codes).
 * @param roll [deg] Roll angle.
 * @param pitch [deg] Pitch angle.
 * @param yaw [deg] Yaw angle (heading).
 * @param roll_rate [deg/s] Roll angular velocity.
 * @param pitch_rate [deg/s] Pitch angular velocity.
 * @param yaw_rate [deg/s] Yaw angular velocity.
 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 * @param alt_msl [mm] Altitude above mean sea level (MSL) in millimeters.
 * @param alt_relative [mm] Altitude above ground/takeoff point in millimeters.
 * @param groundspeed [m/s] Ground speed (2D velocity).
 * @param vertical_speed [m/s] Vertical speed (positive=up).
 * @param airspeed [m/s] Airspeed (3D velocity magnitude, for fixed-wing).
 * @param battery_voltage [V] Battery voltage.
 * @param battery_current [A] Battery current (negative=discharging).
 * @param battery_remaining [%] Remaining battery capacity (0-100%).
 * @param gps_sats  Number of GPS satellites visible.
 * @param gps_fix_type  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).
 * @param gps_hdop  GPS HDOP horizontal dilution of precision (unitless * 100).
 * @param rc_rssi [%] RC signal strength (0-100%).
 * @param throttle_pct  Throttle percentage (0-1000, 500=50%).
 * @param ekf_flags  EKF status flags (bit field).
 * @param vibration_level [%] Vibration level (0-100%).
 * @param cpu_load [%] CPU load percentage (0-100%).
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_simple_fc_data_monitor_send(mavlink_channel_t chan, uint64_t time_unix_usec, uint16_t frame_id, uint8_t flight_mode, uint8_t armed_status, uint8_t system_health, float roll, float pitch, float yaw, float roll_rate, float pitch_rate, float yaw_rate, int32_t lat, int32_t lon, int32_t alt_msl, int32_t alt_relative, float groundspeed, float vertical_speed, float airspeed, float battery_voltage, float battery_current, uint8_t battery_remaining, uint8_t gps_sats, uint8_t gps_fix_type, uint16_t gps_hdop, uint8_t rc_rssi, uint16_t throttle_pct, uint16_t ekf_flags, uint8_t vibration_level, uint8_t cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN];
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, roll);
    _mav_put_float(buf, 12, pitch);
    _mav_put_float(buf, 16, yaw);
    _mav_put_float(buf, 20, roll_rate);
    _mav_put_float(buf, 24, pitch_rate);
    _mav_put_float(buf, 28, yaw_rate);
    _mav_put_int32_t(buf, 32, lat);
    _mav_put_int32_t(buf, 36, lon);
    _mav_put_int32_t(buf, 40, alt_msl);
    _mav_put_int32_t(buf, 44, alt_relative);
    _mav_put_float(buf, 48, groundspeed);
    _mav_put_float(buf, 52, vertical_speed);
    _mav_put_float(buf, 56, airspeed);
    _mav_put_float(buf, 60, battery_voltage);
    _mav_put_float(buf, 64, battery_current);
    _mav_put_uint16_t(buf, 68, frame_id);
    _mav_put_uint16_t(buf, 70, gps_hdop);
    _mav_put_uint16_t(buf, 72, throttle_pct);
    _mav_put_uint16_t(buf, 74, ekf_flags);
    _mav_put_uint8_t(buf, 76, flight_mode);
    _mav_put_uint8_t(buf, 77, armed_status);
    _mav_put_uint8_t(buf, 78, system_health);
    _mav_put_uint8_t(buf, 79, battery_remaining);
    _mav_put_uint8_t(buf, 80, gps_sats);
    _mav_put_uint8_t(buf, 81, gps_fix_type);
    _mav_put_uint8_t(buf, 82, rc_rssi);
    _mav_put_uint8_t(buf, 83, vibration_level);
    _mav_put_uint8_t(buf, 84, cpu_load);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR, buf, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#else
    mavlink_simple_fc_data_monitor_t packet;
    packet.time_unix_usec = time_unix_usec;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.roll_rate = roll_rate;
    packet.pitch_rate = pitch_rate;
    packet.yaw_rate = yaw_rate;
    packet.lat = lat;
    packet.lon = lon;
    packet.alt_msl = alt_msl;
    packet.alt_relative = alt_relative;
    packet.groundspeed = groundspeed;
    packet.vertical_speed = vertical_speed;
    packet.airspeed = airspeed;
    packet.battery_voltage = battery_voltage;
    packet.battery_current = battery_current;
    packet.frame_id = frame_id;
    packet.gps_hdop = gps_hdop;
    packet.throttle_pct = throttle_pct;
    packet.ekf_flags = ekf_flags;
    packet.flight_mode = flight_mode;
    packet.armed_status = armed_status;
    packet.system_health = system_health;
    packet.battery_remaining = battery_remaining;
    packet.gps_sats = gps_sats;
    packet.gps_fix_type = gps_fix_type;
    packet.rc_rssi = rc_rssi;
    packet.vibration_level = vibration_level;
    packet.cpu_load = cpu_load;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR, (const char *)&packet, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#endif
}

/**
 * @brief Send a simple_fc_data_monitor message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_simple_fc_data_monitor_send_struct(mavlink_channel_t chan, const mavlink_simple_fc_data_monitor_t* simple_fc_data_monitor)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_simple_fc_data_monitor_send(chan, simple_fc_data_monitor->time_unix_usec, simple_fc_data_monitor->frame_id, simple_fc_data_monitor->flight_mode, simple_fc_data_monitor->armed_status, simple_fc_data_monitor->system_health, simple_fc_data_monitor->roll, simple_fc_data_monitor->pitch, simple_fc_data_monitor->yaw, simple_fc_data_monitor->roll_rate, simple_fc_data_monitor->pitch_rate, simple_fc_data_monitor->yaw_rate, simple_fc_data_monitor->lat, simple_fc_data_monitor->lon, simple_fc_data_monitor->alt_msl, simple_fc_data_monitor->alt_relative, simple_fc_data_monitor->groundspeed, simple_fc_data_monitor->vertical_speed, simple_fc_data_monitor->airspeed, simple_fc_data_monitor->battery_voltage, simple_fc_data_monitor->battery_current, simple_fc_data_monitor->battery_remaining, simple_fc_data_monitor->gps_sats, simple_fc_data_monitor->gps_fix_type, simple_fc_data_monitor->gps_hdop, simple_fc_data_monitor->rc_rssi, simple_fc_data_monitor->throttle_pct, simple_fc_data_monitor->ekf_flags, simple_fc_data_monitor->vibration_level, simple_fc_data_monitor->cpu_load);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR, (const char *)simple_fc_data_monitor, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#endif
}

#if MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_simple_fc_data_monitor_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t time_unix_usec, uint16_t frame_id, uint8_t flight_mode, uint8_t armed_status, uint8_t system_health, float roll, float pitch, float yaw, float roll_rate, float pitch_rate, float yaw_rate, int32_t lat, int32_t lon, int32_t alt_msl, int32_t alt_relative, float groundspeed, float vertical_speed, float airspeed, float battery_voltage, float battery_current, uint8_t battery_remaining, uint8_t gps_sats, uint8_t gps_fix_type, uint16_t gps_hdop, uint8_t rc_rssi, uint16_t throttle_pct, uint16_t ekf_flags, uint8_t vibration_level, uint8_t cpu_load)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint64_t(buf, 0, time_unix_usec);
    _mav_put_float(buf, 8, roll);
    _mav_put_float(buf, 12, pitch);
    _mav_put_float(buf, 16, yaw);
    _mav_put_float(buf, 20, roll_rate);
    _mav_put_float(buf, 24, pitch_rate);
    _mav_put_float(buf, 28, yaw_rate);
    _mav_put_int32_t(buf, 32, lat);
    _mav_put_int32_t(buf, 36, lon);
    _mav_put_int32_t(buf, 40, alt_msl);
    _mav_put_int32_t(buf, 44, alt_relative);
    _mav_put_float(buf, 48, groundspeed);
    _mav_put_float(buf, 52, vertical_speed);
    _mav_put_float(buf, 56, airspeed);
    _mav_put_float(buf, 60, battery_voltage);
    _mav_put_float(buf, 64, battery_current);
    _mav_put_uint16_t(buf, 68, frame_id);
    _mav_put_uint16_t(buf, 70, gps_hdop);
    _mav_put_uint16_t(buf, 72, throttle_pct);
    _mav_put_uint16_t(buf, 74, ekf_flags);
    _mav_put_uint8_t(buf, 76, flight_mode);
    _mav_put_uint8_t(buf, 77, armed_status);
    _mav_put_uint8_t(buf, 78, system_health);
    _mav_put_uint8_t(buf, 79, battery_remaining);
    _mav_put_uint8_t(buf, 80, gps_sats);
    _mav_put_uint8_t(buf, 81, gps_fix_type);
    _mav_put_uint8_t(buf, 82, rc_rssi);
    _mav_put_uint8_t(buf, 83, vibration_level);
    _mav_put_uint8_t(buf, 84, cpu_load);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR, buf, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#else
    mavlink_simple_fc_data_monitor_t *packet = (mavlink_simple_fc_data_monitor_t *)msgbuf;
    packet->time_unix_usec = time_unix_usec;
    packet->roll = roll;
    packet->pitch = pitch;
    packet->yaw = yaw;
    packet->roll_rate = roll_rate;
    packet->pitch_rate = pitch_rate;
    packet->yaw_rate = yaw_rate;
    packet->lat = lat;
    packet->lon = lon;
    packet->alt_msl = alt_msl;
    packet->alt_relative = alt_relative;
    packet->groundspeed = groundspeed;
    packet->vertical_speed = vertical_speed;
    packet->airspeed = airspeed;
    packet->battery_voltage = battery_voltage;
    packet->battery_current = battery_current;
    packet->frame_id = frame_id;
    packet->gps_hdop = gps_hdop;
    packet->throttle_pct = throttle_pct;
    packet->ekf_flags = ekf_flags;
    packet->flight_mode = flight_mode;
    packet->armed_status = armed_status;
    packet->system_health = system_health;
    packet->battery_remaining = battery_remaining;
    packet->gps_sats = gps_sats;
    packet->gps_fix_type = gps_fix_type;
    packet->rc_rssi = rc_rssi;
    packet->vibration_level = vibration_level;
    packet->cpu_load = cpu_load;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR, (const char *)packet, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_MIN_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_CRC);
#endif
}
#endif

#endif

// MESSAGE SIMPLE_FC_DATA_MONITOR UNPACKING


/**
 * @brief Get field time_unix_usec from simple_fc_data_monitor message
 *
 * @return [us] Timestamp (UNIX epoch time in microseconds).
 */
static inline uint64_t mavlink_msg_simple_fc_data_monitor_get_time_unix_usec(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  0);
}

/**
 * @brief Get field frame_id from simple_fc_data_monitor message
 *
 * @return  Frame ID (incremental counter for packet loss detection).
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_get_frame_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  68);
}

/**
 * @brief Get field flight_mode from simple_fc_data_monitor message
 *
 * @return  Current flight mode (MAV_MODE or custom mode number).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_flight_mode(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  76);
}

/**
 * @brief Get field armed_status from simple_fc_data_monitor message
 *
 * @return  Armed status (0=Disarmed, 1=Armed).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_armed_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  77);
}

/**
 * @brief Get field system_health from simple_fc_data_monitor message
 *
 * @return  System health status (0=OK, 1-255=Various error codes).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_system_health(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  78);
}

/**
 * @brief Get field roll from simple_fc_data_monitor message
 *
 * @return [deg] Roll angle.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_roll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field pitch from simple_fc_data_monitor message
 *
 * @return [deg] Pitch angle.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_pitch(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field yaw from simple_fc_data_monitor message
 *
 * @return [deg] Yaw angle (heading).
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_yaw(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field roll_rate from simple_fc_data_monitor message
 *
 * @return [deg/s] Roll angular velocity.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_roll_rate(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field pitch_rate from simple_fc_data_monitor message
 *
 * @return [deg/s] Pitch angular velocity.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_pitch_rate(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field yaw_rate from simple_fc_data_monitor message
 *
 * @return [deg/s] Yaw angular velocity.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_yaw_rate(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field lat from simple_fc_data_monitor message
 *
 * @return [degE7] Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 */
static inline int32_t mavlink_msg_simple_fc_data_monitor_get_lat(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  32);
}

/**
 * @brief Get field lon from simple_fc_data_monitor message
 *
 * @return [degE7] Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7.
 */
static inline int32_t mavlink_msg_simple_fc_data_monitor_get_lon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  36);
}

/**
 * @brief Get field alt_msl from simple_fc_data_monitor message
 *
 * @return [mm] Altitude above mean sea level (MSL) in millimeters.
 */
static inline int32_t mavlink_msg_simple_fc_data_monitor_get_alt_msl(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  40);
}

/**
 * @brief Get field alt_relative from simple_fc_data_monitor message
 *
 * @return [mm] Altitude above ground/takeoff point in millimeters.
 */
static inline int32_t mavlink_msg_simple_fc_data_monitor_get_alt_relative(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  44);
}

/**
 * @brief Get field groundspeed from simple_fc_data_monitor message
 *
 * @return [m/s] Ground speed (2D velocity).
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_groundspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field vertical_speed from simple_fc_data_monitor message
 *
 * @return [m/s] Vertical speed (positive=up).
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_vertical_speed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Get field airspeed from simple_fc_data_monitor message
 *
 * @return [m/s] Airspeed (3D velocity magnitude, for fixed-wing).
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_airspeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}

/**
 * @brief Get field battery_voltage from simple_fc_data_monitor message
 *
 * @return [V] Battery voltage.
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_battery_voltage(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}

/**
 * @brief Get field battery_current from simple_fc_data_monitor message
 *
 * @return [A] Battery current (negative=discharging).
 */
static inline float mavlink_msg_simple_fc_data_monitor_get_battery_current(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  64);
}

/**
 * @brief Get field battery_remaining from simple_fc_data_monitor message
 *
 * @return [%] Remaining battery capacity (0-100%).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_battery_remaining(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  79);
}

/**
 * @brief Get field gps_sats from simple_fc_data_monitor message
 *
 * @return  Number of GPS satellites visible.
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_gps_sats(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  80);
}

/**
 * @brief Get field gps_fix_type from simple_fc_data_monitor message
 *
 * @return  GPS fix type (0=No fix, 1=No fix, 2=2D fix, 3=3D fix).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_gps_fix_type(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  81);
}

/**
 * @brief Get field gps_hdop from simple_fc_data_monitor message
 *
 * @return  GPS HDOP horizontal dilution of precision (unitless * 100).
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_get_gps_hdop(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  70);
}

/**
 * @brief Get field rc_rssi from simple_fc_data_monitor message
 *
 * @return [%] RC signal strength (0-100%).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_rc_rssi(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  82);
}

/**
 * @brief Get field throttle_pct from simple_fc_data_monitor message
 *
 * @return  Throttle percentage (0-1000, 500=50%).
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_get_throttle_pct(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  72);
}

/**
 * @brief Get field ekf_flags from simple_fc_data_monitor message
 *
 * @return  EKF status flags (bit field).
 */
static inline uint16_t mavlink_msg_simple_fc_data_monitor_get_ekf_flags(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  74);
}

/**
 * @brief Get field vibration_level from simple_fc_data_monitor message
 *
 * @return [%] Vibration level (0-100%).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_vibration_level(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  83);
}

/**
 * @brief Get field cpu_load from simple_fc_data_monitor message
 *
 * @return [%] CPU load percentage (0-100%).
 */
static inline uint8_t mavlink_msg_simple_fc_data_monitor_get_cpu_load(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  84);
}

/**
 * @brief Decode a simple_fc_data_monitor message into a struct
 *
 * @param msg The message to decode
 * @param simple_fc_data_monitor C-struct to decode the message contents into
 */
static inline void mavlink_msg_simple_fc_data_monitor_decode(const mavlink_message_t* msg, mavlink_simple_fc_data_monitor_t* simple_fc_data_monitor)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    simple_fc_data_monitor->time_unix_usec = mavlink_msg_simple_fc_data_monitor_get_time_unix_usec(msg);
    simple_fc_data_monitor->roll = mavlink_msg_simple_fc_data_monitor_get_roll(msg);
    simple_fc_data_monitor->pitch = mavlink_msg_simple_fc_data_monitor_get_pitch(msg);
    simple_fc_data_monitor->yaw = mavlink_msg_simple_fc_data_monitor_get_yaw(msg);
    simple_fc_data_monitor->roll_rate = mavlink_msg_simple_fc_data_monitor_get_roll_rate(msg);
    simple_fc_data_monitor->pitch_rate = mavlink_msg_simple_fc_data_monitor_get_pitch_rate(msg);
    simple_fc_data_monitor->yaw_rate = mavlink_msg_simple_fc_data_monitor_get_yaw_rate(msg);
    simple_fc_data_monitor->lat = mavlink_msg_simple_fc_data_monitor_get_lat(msg);
    simple_fc_data_monitor->lon = mavlink_msg_simple_fc_data_monitor_get_lon(msg);
    simple_fc_data_monitor->alt_msl = mavlink_msg_simple_fc_data_monitor_get_alt_msl(msg);
    simple_fc_data_monitor->alt_relative = mavlink_msg_simple_fc_data_monitor_get_alt_relative(msg);
    simple_fc_data_monitor->groundspeed = mavlink_msg_simple_fc_data_monitor_get_groundspeed(msg);
    simple_fc_data_monitor->vertical_speed = mavlink_msg_simple_fc_data_monitor_get_vertical_speed(msg);
    simple_fc_data_monitor->airspeed = mavlink_msg_simple_fc_data_monitor_get_airspeed(msg);
    simple_fc_data_monitor->battery_voltage = mavlink_msg_simple_fc_data_monitor_get_battery_voltage(msg);
    simple_fc_data_monitor->battery_current = mavlink_msg_simple_fc_data_monitor_get_battery_current(msg);
    simple_fc_data_monitor->frame_id = mavlink_msg_simple_fc_data_monitor_get_frame_id(msg);
    simple_fc_data_monitor->gps_hdop = mavlink_msg_simple_fc_data_monitor_get_gps_hdop(msg);
    simple_fc_data_monitor->throttle_pct = mavlink_msg_simple_fc_data_monitor_get_throttle_pct(msg);
    simple_fc_data_monitor->ekf_flags = mavlink_msg_simple_fc_data_monitor_get_ekf_flags(msg);
    simple_fc_data_monitor->flight_mode = mavlink_msg_simple_fc_data_monitor_get_flight_mode(msg);
    simple_fc_data_monitor->armed_status = mavlink_msg_simple_fc_data_monitor_get_armed_status(msg);
    simple_fc_data_monitor->system_health = mavlink_msg_simple_fc_data_monitor_get_system_health(msg);
    simple_fc_data_monitor->battery_remaining = mavlink_msg_simple_fc_data_monitor_get_battery_remaining(msg);
    simple_fc_data_monitor->gps_sats = mavlink_msg_simple_fc_data_monitor_get_gps_sats(msg);
    simple_fc_data_monitor->gps_fix_type = mavlink_msg_simple_fc_data_monitor_get_gps_fix_type(msg);
    simple_fc_data_monitor->rc_rssi = mavlink_msg_simple_fc_data_monitor_get_rc_rssi(msg);
    simple_fc_data_monitor->vibration_level = mavlink_msg_simple_fc_data_monitor_get_vibration_level(msg);
    simple_fc_data_monitor->cpu_load = mavlink_msg_simple_fc_data_monitor_get_cpu_load(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN? msg->len : MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN;
        memset(simple_fc_data_monitor, 0, MAVLINK_MSG_ID_SIMPLE_FC_DATA_MONITOR_LEN);
    memcpy(simple_fc_data_monitor, _MAV_PAYLOAD(msg), len);
#endif
}
